package com.lee.serviceagent.ocr.tesseract;

/**
 * @author lee
 * @description class
 * @date 2025/8/19 上午10:48
 */
public class DocumentProcessor {
    public String processDocument(String imagePath) {
        OCRService ocrService = new OCRService();
        String text = ocrService.doOCR(imagePath);
        if (text != null && !text.isEmpty()) {
            InfoExtractor extractor = new InfoExtractor();
            String idNumber = extractor.extractIDNumber(text);
            return idNumber;//返回提取的身份证号
        }
        return null;
    }
}
